<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: CStream Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/d16/class_c_stream.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../dc/dd2/class_c_stream-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CStream Class Reference<div class="ingroups"><a class="el" href="../../d1/d6c/group___peripherals.html">Peripherals</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &quot;<a class="el" href="../../d8/d95/stream_8h_source.html">class/stream.h</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for CStream:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../d4/d16/class_c_stream.png" usemap="#CStream_map" alt=""/>
  <map id="CStream_map" name="CStream_map">
<area href="../../dc/dac/class_c_object.html" alt="CObject" shape="rect" coords="72,0,134,24"/>
<area href="../../d7/d03/classble_serial.html" title="bleSerial class is a ble core, and inherits from CStream class to provide the stream virtual function..." alt="bleSerial" shape="rect" coords="0,112,62,136"/>
<area href="../../d8/d1d/class_c_serial.html" alt="CSerial" shape="rect" coords="72,112,134,136"/>
<area href="../../d6/dc5/classusb_c_d_c.html" alt="usbCDC" shape="rect" coords="144,112,206,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a96328807241e15017868b845b06fd9e4"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a96328807241e15017868b845b06fd9e4">readable</a> ()</td></tr>
<tr class="separator:a96328807241e15017868b845b06fd9e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56ec27ee664f1a4eb9910988b78833d5"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a56ec27ee664f1a4eb9910988b78833d5">writeable</a> ()</td></tr>
<tr class="separator:a56ec27ee664f1a4eb9910988b78833d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80977482ffb2f7b626a9f29f437b7d8d"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a80977482ffb2f7b626a9f29f437b7d8d">read</a> (void *buf, int len, bool block=true)</td></tr>
<tr class="separator:a80977482ffb2f7b626a9f29f437b7d8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a172fe857c74488b881007c65cc2e9552"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a172fe857c74488b881007c65cc2e9552">write</a> (const void *buf, int len, bool block=true)</td></tr>
<tr class="separator:a172fe857c74488b881007c65cc2e9552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a152e6bda8654064634428d81bd81cb"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a7a152e6bda8654064634428d81bd81cb">isConnected</a> ()</td></tr>
<tr class="separator:a7a152e6bda8654064634428d81bd81cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bd707b33627e01c2069b14bbf10694a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a5bd707b33627e01c2069b14bbf10694a">flush</a> ()</td></tr>
<tr class="separator:a5bd707b33627e01c2069b14bbf10694a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af56764abe8954430eede10e253f8994f"><td class="memItemLeft" align="right" valign="top">virtual uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#af56764abe8954430eede10e253f8994f">read</a> ()</td></tr>
<tr class="separator:af56764abe8954430eede10e253f8994f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48041fea5cad32feaeef543bcaa2d37d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a48041fea5cad32feaeef543bcaa2d37d">write</a> (uint8_t c)</td></tr>
<tr class="separator:a48041fea5cad32feaeef543bcaa2d37d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c6130bd65b00f278045d8b7b8ea7f84"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#a2c6130bd65b00f278045d8b7b8ea7f84">operator&lt;&lt;</a> (uint8_t c)</td></tr>
<tr class="separator:a2c6130bd65b00f278045d8b7b8ea7f84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2bd1778d5f5cfab469e5df615e1c8fc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#af2bd1778d5f5cfab469e5df615e1c8fc">operator&gt;&gt;</a> (uint8_t c)</td></tr>
<tr class="separator:af2bd1778d5f5cfab469e5df615e1c8fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbaa22d4608c1a015a20104fde6c8ccf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#acbaa22d4608c1a015a20104fde6c8ccf">operator uint8_t</a> ()</td></tr>
<tr class="separator:acbaa22d4608c1a015a20104fde6c8ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc833c2eea18af67b57ba641ec58fea7"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#acc833c2eea18af67b57ba641ec58fea7">operator char</a> ()</td></tr>
<tr class="separator:acc833c2eea18af67b57ba641ec58fea7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f2d74f0924caa2e863d049fe9ada80"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d16/class_c_stream.html#ad2f2d74f0924caa2e863d049fe9ada80">operator&lt;&lt;</a> (<a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;s)</td></tr>
<tr class="separator:ad2f2d74f0924caa2e863d049fe9ada80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dac/class_c_object.html#a26a76c241a4d62d2efdac57d2cfe4c0f">isThread</a> ()</td></tr>
<tr class="separator:a26a76c241a4d62d2efdac57d2cfe4c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An abstract class, to define the serial stream input and output interface. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5bd707b33627e01c2069b14bbf10694a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CStream::flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Flush the stream the both input and output buffer </p>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#ad41b78cc1b0fc02ce65248147b32ffa8">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a68aecf6351423ae0e8791870c9e694bf">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#afebca0ce341d46537cc6e2a811bede72">usbCDC</a>.</p>

</div>
</div>
<a class="anchor" id="a7a152e6bda8654064634428d81bd81cb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CStream::isConnected </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check the current connection is valid or not. </p>
<dl class="section return"><dt>Returns</dt><dd>true if current connection is valid. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#aebfde0d9a7583cb641ac60f02df7cd77">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#ae7c133c4586cd5ca729cd026f813a8a0">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#a0c0cb27d108bed8763e68a4121efee32">usbCDC</a>.</p>

</div>
</div>
<a class="anchor" id="a26a76c241a4d62d2efdac57d2cfe4c0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool CObject::isThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Check current object that inherits from <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class or not. </p>
<dl class="section note"><dt>Note</dt><dd>The isTherad() will be override by <a class="el" href="../../d0/d26/class_c_thread.html">CThread</a> class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">CThread</a>.</p>

</div>
</div>
<a class="anchor" id="acc833c2eea18af67b57ba641ec58fea7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CStream::operator char </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator 'char', to receive a char from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">char</span> ch;</div>
<div class="line">ch = uart;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="acbaa22d4608c1a015a20104fde6c8ccf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual CStream::operator uint8_t </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator 'uint8_t', to receive a byte from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch;</div>
<div class="line">ch = uart;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a2c6130bd65b00f278045d8b7b8ea7f84"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator '&lt;&lt;', to output a byte to stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch = 0xA5;</div>
<div class="line">uart &lt;&lt; ch;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ad2f2d74f0924caa2e863d049fe9ada80"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d4/d16/class_c_stream.html">CStream</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Read a byte from right stream and send to left stream. </p>

</div>
</div>
<a class="anchor" id="af2bd1778d5f5cfab469e5df615e1c8fc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d4/d16/class_c_stream.html">CStream</a>&amp; CStream::operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Operator '&gt;&gt;', to input a byte from stream. </p>
<div class="fragment"><div class="line"><a class="code" href="../../d8/d1d/class_c_serial.html">CSerial</a> uart;</div>
<div class="line">uart.<a class="code" href="../../d8/d1d/class_c_serial.html#aff7c822bada51065ad52542fb9515be6">enable</a>(19200);</div>
<div class="line"></div>
<div class="line">uint8_t ch ;</div>
<div class="line">uart &gt;&gt; ch;</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="a80977482ffb2f7b626a9f29f437b7d8d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CStream::read </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>block</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>To read the stream to buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Destination buffer. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of destination buffer. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>If true, to block in the read function unit to the indication length (len) be read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A value to indicate how many data bytes to read. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#a186e09706d9b6e58a6213ac0b6a220ad">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a9b658bf4bc4d81413627bc2fe81e1471">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#a65831ad4bfa85bf83f467c63b9f22799">usbCDC</a>.</p>

</div>
</div>
<a class="anchor" id="af56764abe8954430eede10e253f8994f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint8_t CStream::read </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Read a byte from stream </p>
<dl class="section return"><dt>Returns</dt><dd>uint8_t (8 bits) data from the stream </dd></dl>

</div>
</div>
<a class="anchor" id="a96328807241e15017868b845b06fd9e4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CStream::readable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Determine how many data bytes are available to read. </p>
<dl class="section return"><dt>Returns</dt><dd>A value to indicate how many data byte is available in the input buffer. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#a59dca8e3e2d6945a699347f4c4708fd4">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#a0748723f610ddcfdc34286dbbfbd4917">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#a7182c4dfdad0293bba73a82056d43e80">usbCDC</a>.</p>

</div>
</div>
<a class="anchor" id="a172fe857c74488b881007c65cc2e9552"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CStream::write </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>block</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>To write the buffer to stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Source buffer. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Length of source buffer. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>If true, to block in the write function unit to the indication length (len) be sent. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A value to indicate how many data bytes to write. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#ab9d147e7dcb9436f390f2ad29d539930">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#adef6d3e77843c65617b7cb555c2f8732">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#a340c728ca722a61a3a457a546a301dec">usbCDC</a>.</p>

</div>
</div>
<a class="anchor" id="a48041fea5cad32feaeef543bcaa2d37d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CStream::write </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Write a byte to stream </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>is a uint8_t data to send to the stream. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a56ec27ee664f1a4eb9910988b78833d5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int CStream::writeable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Determine how many data space are available to write. </p>
<dl class="section return"><dt>Returns</dt><dd>A value to indicate how many data space is available in the output buffer. </dd></dl>
<dl class="section remark"><dt>Remarks</dt><dd>the pure virtual function have to implement by child class. </dd></dl>

<p>Reimplemented in <a class="el" href="../../d7/d03/classble_serial.html#ac42a8f805e6784e0fa2064270b5288a1">bleSerial</a>, <a class="el" href="../../d8/d1d/class_c_serial.html#ac59cfe80216e1fb7eb479017f0bb8e7f">CSerial</a>, and <a class="el" href="../../d6/dc5/classusb_c_d_c.html#ae45acb09392fedde912a5dba6fc3b88a">usbCDC</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d4/d16/class_c_stream.html">CStream</a></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
